This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 517
Add the ability to include other test files #116
Open
jszwedko
wants to merge
2
commits into
sstephenson:master
Choose a base branch
from
jszwedko:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adds an `include` directive that operates similar to `load` but allows you to include other bats test files rather than just bash scripts. Allows for a simple way to DRY up similar tests.
Addresses #99 |
So that it is available to subprocesses (including preprocessing)
Any feedback @sstephenson ? |
Any update here? This has sat around for 6 months, and is really useful... |
I’m aware there are lots of issues that need attention, but Bats is a personal project and I don’t have any time for it right now. I am looking for a full-time maintainer. Maybe that’s you? |
Sylvain303
added a commit
to Sylvain303/bats
that referenced
this pull request
Mar 23, 2017
merging include PR sstephenson#116 in my fork sstephenson#116
I just found this PR. I have a similar PR here |
yarikoptic
pushed a commit
to neurodebian/bats
that referenced
this pull request
Aug 6, 2019
Cover more Bash versions with Docker
yarikoptic
pushed a commit
to neurodebian/bats
that referenced
this pull request
Aug 6, 2019
Since I'm paranoid that we might need to resolve an issue specific to 4.3.11(1)-release (or whatever the Bash version is in the stock Travis Linux image). Also, I didn't want to hold up sstephenson#116 any longer with more tiny requests.
yarikoptic
added a commit
to neurodebian/bats
that referenced
this pull request
Aug 6, 2019
Bats 1.1.0 - 2018-07-08 This is the first release with new features relative to the original Bats 0.4.0. Added: * The `-r, --recursive` flag to scan directory arguments recursively for `*.bats` files (sstephenson#109) * The `contrib/rpm/bats.spec` file to build RPMs (sstephenson#111) Changed: * Travis exercises latest versions of Bash from 3.2 through 4.4 (sstephenson#116, sstephenson#117) * Error output highlights invalid command line options (sstephenson#45, sstephenson#46, sstephenson#118) * Replaced `echo` with `printf` (sstephenson#120) Fixed: * Fixed `BATS_ERROR_STATUS` getting lost when `bats_error_trap` fired multiple times under Bash 4.2.x (sstephenson#110) * Updated `bin/bats` symlink resolution, handling the case on CentOS where `/bin` is a symlink to `/usr/bin` (sstephenson#113, sstephenson#115) * tag 'v1.1.0': (198 commits) Bats 1.1.0 bats: Replace echo with printf Extract `abort()` function travis: Remove `bats -c` wrapper travis: Enable build with default Linux image Bash Add Bash version test to Travis job. Revert "Re-add Bash version check to Docker image build" Re-add Bash version check to Docker image build Move timing test to Docker run for Linux jobs Remove version check from Docker image build Bash version via build matrix instead of script loop Fix merge error. Add return code storage for Bash version loop Add Bash version output during 'docker build' Clean up Docker image tags Add default value for Bash version Cover more Bash versions with Docker BATS_ROOT: Elide options to reset shell options BATS_ROOT: Restore comment noting issue sstephenson#113 BATS_ROOT: Use `set -P`, remove `PWD` resolution ...
2 tasks
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds an
include
directive that operates similar toload
but allowsyou to include other bats test files rather than just bash scripts which allows for a simple way to DRY up similar tests.
See the added tests for a simple example of how this functionality might be used.
I can add documentation for this, but wanted to get feedback on the implementation first.
Thank you!